home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
033a
/
prevnt31.zip
/
PREVENT.DOC
next >
Wrap
Text File
|
1990-10-13
|
8KB
|
176 lines
PREvent 3.10
PCBoard Rotary Event Manager
Release 10-13-90
by Jeff Woods
Ok, time for a complete rewrite of these docs. The update sequence is
getting confusing.
With the release of PCBoard 14.5, I found my multiple event program
trashed, and my need for multiple events still existing. It was a
two hour job to write this, so I hereby dedicate PREvent to the
public domain. If your conscience bothers you so much that you can't
use a program without paying for it, give Telix a plug to a friend.
PREvent is very simple and straightforward. It uses a data file to
read in a list of your event times in chronological order, and matches
them against PCBoard.DAT to determine the next time.
This file, PREVENT.LST is simple. The first line is the number of
events you wish to run, and the remaining lines are those of the event
times and other event information, as well as day of the week
information. For example, I have three events, one at just before midnight,
one at 2:30 am, and one at 4:00 am. My PREVENT.LST file looks like
this (and is the same as the one included here):
4 <- First line MUST be the total number of events
012356 <- Days of the week for event # 1
02:30,y,2,n,10 <- Event information for event # 1
a <- Days of the week for event # 2
04:30,y,20,y,3 <- Event information for event # 2
123564 <- Days of the week for event # 3
12:00,n,2,n,100
012356 etc......
23:57,y
The comments to the right must NOT be present when Prevent is run, or
you will encounter RUNTIME error 106 when run. They are just for your
information within these docs.
Days of the week are as follows, and may appear on the line in any
order. PREvent does not care. 01234 is the same as 40231.
0 - Sunday 4 - Thursday
1 - Monday 5 - Friday
2 - Tuesday 6 - Saturday
3 - Wednesday A - Every day
Note that an "A" ANYWHERE on the days line for an event will override
any other information. Thus 01A2 will still run Wednesday through
Saturday even though 3456 is not on the command line.
The other optional format for the first line for an event is new to
version 3.0. It allows events to run only on specific days of the
MONTH, or in a given month only. Substituting this line for a valid
days of the month line will allow this, if the following format for
month-specific events is followed:
Dmm/dd
Where mm is the month, and dd is the day. Both MM and DD MUST have two
digits, so use D01/01 for January first, etc. You may substitute the
letter "A" for mm, and it will run on the dd'th day of EVERY month. An
example line for that might be for events that compress and clean up
caller logs on the first of each month:
DA/01
The slash is significant, and must separate mm and dd.
Here are a few examples of events that will run on given days of the
MONTH:
D05/15 (will run ONLY on may 15th)
DA/10 (will run on the tenth of EVERY month)
DA/31 (will run on the LAST day of every month with 31 days)
D02/29 (will run once every four years, on leap year)
Yes, Prevent is smart enough to make a few assumptions now. It knows
how many days are in each month and adjusts for leap years as well. It
also will adjust automatically to operate flawlessly, determining which
event is next (there was a minor bug in the day of the week specific
routines in 2.5 - fixed).
The second line for each event is the event specific information about
sliding, acticity suspension, and upload suspension. The format of
these lines is as follows:
┌──────────────────────── Hour and minute of Next Event e.g. 02:00');
│ ┌──────────────────── Slide This Event? ( Y,N )
│ │ ┌────────────────── Minutes prior to event to suspend? ( 0 - 99 )
│ │ │ ┌──────────────── Disallow uploads prior to event? ( Y,N )
│ │ │ │ ┌────────────── Minutes prior to stop allowing uploads? ( 0 - 99 )
│ │ │ │ │
hh:mm,N,5,Y,10
The first parameter, the hh:mm, is the only required parameter, and MUST
contain five characters. All others are optional, but must be in that order.
If you want to disallow uploads 10 minutes before, you MUST also specify a
sliding and minutes to suspend value. If you do not supply a sliding time,
no others will take effect, and so on down the chain.
Thus:
02:00,N,10 sets the next event at 2 am with no sliding, and suspends
activity 10 minutes prior.
15:00,Y,0,Y,30 will set an event for 3 pm, slide it, but will stop all
uploads 30 minutes before three.
23:00 simply sets the next event to 11 pm, leaving all other
params as they were.
Note that order is important. The order MUST be chronological,
starting with 02:30 (the earliest possible event time) and ending with
the latest, 23:57. All times must be in military format. The .LST
file may contain up to 48 differenct event times. Place this file in
your PCBoard system directory, the same one where PCBoard.DAT resides.
This is usually something like D:\PCB.
Place PREVENT.EXE in your PCBoard system directory also. No parameters
are required to run PREvent. Just include the command:
PREVENT [datafile]
in your EVENT.SYS and off it goes.
The default datafile name is PREVENT.LST in the current directory.
PREvent returns an error level based on the event it runs. In the above
example, if the CURRENT event running is the 02:30 event, no matter WHAT
the next event is (it can be different depending on what days it is set
to run) it will return an errorlevel of 1. Note that this differs
from versions prior to 2.3 in that older versions based the error level
on the next event, which is no longer possible with the addition of day
specific events. You can use these errorlevels in your EVENT.SYS
file to take the appropriate action. Thus, if errorlevel 1 is
returned, you know that the 2:30 event is running and can call the
according batch file. I hope that's not too confusing.
As an example, using the above config file, your EVENT.SYS file might
look like this:
PREVENT PREVENT.LST
if errorlevel 4 event4.bat <- this would run at the 2:30 event
if errorlevel 3 event3.bat <- this would run at the 4:30 event
if errorlevel 2 event2.bat <- this would run at the 12:00 event
if errorlevel 1 event1.bat <- this would run at the 23:57 event
if errorlevel 0 board.bat
Errorlevels MUST be checked in reverse order, since "if errorlevel 1" is
actually "if errorlevel >= 1".
PREvent works ONLY on PCBoard 14.0+. Any attempt to use it on earlier
version are not warranted. It should not change anything in such a
case and will return an error level of zero, but no guarantees.
And now for the legal, boring stuff. I left it until the end, so if
you don't care to read this, oh, well. It was here.
Jeff Woods nor the Musical Chair warrants any part of this program. It
is provided free, and as such, any damages it may cause to files,
hardware, or incidental damages such as lost time or wages, are not my
responsibility. Or, in short, I cannot be held responsible for any
damages resulting from the use (or mis-use) of this program.
As with all software, you should backup your PCBoard.DAT file before
trying this the first time. The latest version is always available for
downloading from the Musical Chair at 416-438-3009, running an HST Dual
Standard.